const { Schema, SchemaTypes } = require('../schema');

/**
 * 用户推广记录
 */
class PromoteRecord extends Schema {
    PropertyModelDataTemplate () {
        return {
            // 推销员id
            promoterId: { type: SchemaTypes.ObjectId, required: true },
            // 客户id
            customId: { type: SchemaTypes.ObjectId, required: true },

            areaId: { type: SchemaTypes.ObjectId, required: true },
            createTime: { type: SchemaTypes.Number, required: true, default: require('../../module/tool/time').getCurrentTimestamp() }
        };
    }
}

module.exports = PromoteRecord;
